The type or namespace name ‘xrm’ does not exist in the namespace ‘Microsoft’

Hi everyone,,

Today, while writing a Console application, I came up with an error saying: The type or namespace name ‘xrm’ does not exist in the namespace ‘Microsoft’.

Even-though I have added all the referencing dll’s from the SDK’s bin folder, I got this error.

Image

I was little bit confused. After sometime, I got the resolution for this error by just:

Right Clicking on the Project -> Properties -> Application and setting the Target Framework to .NET Framework 4.

By default, it was set to .NET Framework 4 Client Profile. It should be set to Client Profile only for WCF and other Windows Forms applications.  So, I just changed it to .NET Framework 4.

Image

.NET Framework Client Profile is nothing but the subset of .NET Framework with some features contained in it.

The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile. To know more, Click here.

Cheers,

Naren

Leave a comment